function GetAccessRules1() {
	
	
	var myData = [
			['1', '启用', '设备1','inside','GigabitEthernet0/0<br>GigabitEthernet0/1', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>All-Inside-Subnets","<img src='images/terminal.png'>Corp-Mail-Server","<img src='images/tcp.png'>Mail_Services","<img src='images/tick.png'>Permit","0","Alerts","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单1","Allow individual hosts to vpn to partner services",'2,3','建议合并'],
			['2', '启用', '设备1','inside','GigabitEthernet0/0<br>GigabitEthernet0/1', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>FTP_Servers_inside<br><img src='images/terminallist.png'>Web_Servers_group","<img src='images/terminal.png'>10.0.101.0/24<br><img src='images/terminal.png'>10.0.102.0/24<br><img src='images/terminal.png'>10.0.100.0/24<br><img src='images/terminal.png'>10.0.103.0/24<br><img src='images/terminal.png'>10.0.104.0/24","<img src='images/tcp.png'>ftp<br><img src='images/tcp.png'>http<br><img src='images/tcp.png'>https<br><img src='images/tcp.png'>ssh","<img src='images/delete.png'>Deny","0","Critical","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单11","",'1,3','被包含，可删除'],
			['3', '启用', '设备1','inside','GigabitEthernet0/0<br>GigabitEthernet0/1', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>inside-network/24","<img src='images/terminal.png'>10.1.100.0/24","<img src='images/tcp.png'>ftp","<img src='images/tick.png'>Permit","1","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单2","",'2,1','包含其它策略'],
			['4', '禁用', '设备2','outside','GigabitEthernet0/2<br>GigabitEthernet0/3', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>any","<img src='images/terminal.png'>WWW_Server","<img src='images/tcp.png'>http","<img src='images/tick.png'>Permit","2","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单3","",'3','被包含，可删除'],
			['5', '禁用', '设备2','outside','GigabitEthernet0/2<br>GigabitEthernet0/3', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>any","<img src='images/terminal.png'>DMZ-network","<img src='images/tcp.png'>http","<img src='images/tick.png'>Permit","1","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单4","",'1','被包含，可删除'],
			['6', '禁用', '设备2','outside','GigabitEthernet0/2<br>GigabitEthernet0/3', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>outside-network/24","<img src='images/terminal.png'>Ftp_Server","<img src='images/tcp.png'>ftp","<img src='images/tick.png'>Permit","2","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单5","",'2','包含其它策略'],
			['7', '启用', '设备3','DMZ','GigabitEthernet0/4', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>Remote-net-groups","<img src='images/terminal.png'>Web_Server_group","<img src='images/tcp.png'>HTTP-services","<img src='images/tick.png'>Permit","3","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单6","",'2,3','包含其它策略'],
			['8', '禁用', '设备3','DMZ','GigabitEthernet0/4', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>10.1.100.0/24","<img src='images/terminal.png'>FTP_Server_group","<img src='images/tcp.png'>ftp","<img src='images/delete.png'>Deny","2","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单7","",'1,3','建议合并'],
			['9', '启用', '设备3','DMZ','GigabitEthernet0/4', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>partner-dmz-network","<img src='images/terminal.png'>Web_Server_group","<img src='images/tcp.png'>ip","<img src='images/tick.png'>Permit","2","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","申请单8","",'1,2','建议合并'],
			['10', '禁用','设备4', 'Global','', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>any","<img src='images/terminal.png'>Cisco","<img src='images/tcp.png'>HTTP-services","<img src='images/tick.png'>Permit","1","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","历史记录","",'3','建议合并'],
			['11', '禁用','设备4', 'Global','', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>any","<img src='images/terminal.png'>Youtube","<img src='images/tcp.png'>HTTP-services","<img src='images/delete.png'>Deny","1","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","历史记录","Marketing, and one of the sales people need access to Youtube for posting product videos",'3','被包含，可删除'],
			['12', '禁用','设备4', 'Global','', '<input type="checkbox" checked> ', "<img src='images/terminallist.png'>any","<img src='images/terminal.png'>Facebook","<img src='images/tcp.png'>HTTP-services","<img src='images/tick.png'>Permit","1","Warnings","","2012-08-08 9:00:00","2012-08-08 17:00:00","历史记录","Allow only employees to visit Facebook",'2','建议合并']
	];



		
   // shared reader
    var reader = new Ext.data.ArrayReader({}, [
       			{
							name : 'id'
						}, {
							name : 'status'
						}, {
							name : 'devices'
						}, {
							name : 'type'
						}, {
							name : 'interface'
						}, {
							name : 'Enabled'
						}, {
							name : 'Source'
						}, {
							name : 'Destination'
						}, {
							name : 'Service'
						}, {
							name : 'Action'
						}, {
							name : 'Hits'
						}, {
							name : 'Logging'
						}, {
							name : 'Time'
						}, {
							name : 'OnlieTime'
						}, {
							name : 'OfflineTime'
						}, {
							name : 'apply'
						}, {
							name : 'Description'
						}
    ]);

    var store = new Ext.data.GroupingStore({
            reader: reader,
            data: myData,
            sortInfo:{field: 'id', direction: "ASC"}
        });

	
	var sm = new Ext.grid.CheckboxSelectionModel();
	var grid = new Ext.grid.GridPanel({
				store : store,
				columns : [{
							id : 'id',
							header : 'id',
							width : 10,
							sortable : true,
							dataIndex : 'id',
							hidden : true
						}, {
							header : 'status',
							width : 70,
							sortable : true,
							dataIndex : 'status'
						}, {
							header : '区域',
							width : 50,
							sortable : true,
							dataIndex : 'type'
						}, {
							header : '接口',
							width : 100,
							sortable : true,
							dataIndex : 'interface'
						}, {
							header : '源对象',
							width : 150,
							sortable : true,
							dataIndex : 'Source'
						}, {
							header : '目的对象',
							width : 150,
							sortable : true,
							dataIndex : 'Destination'
						}, {
							header : '服务',
							width : 100,
							sortable : true,
							dataIndex : 'Service'
						}, {
							header : '动作',
							width : 70,
							sortable : true,
							dataIndex : 'Action'
						}, {
							header : '命中量',
							width : 30,
							sortable : true,
							dataIndex : 'Hits'
						}, {
							header : '日志级别',
							width : 70,
							sortable : true,
							dataIndex : 'Logging'
						}, {
							header : '时间',
							width : 50,
							sortable : true,
							dataIndex : 'Time'
						}, {
							header : '在线时间',
							width : 120,
							sortable : true,
							dataIndex : 'OnlieTime'
						}, {
							header : '离线时间',
							width : 120,
							sortable : true,
							dataIndex : 'OfflineTime'
						}, {
							header : '工作类型',
							width : 60,
							sortable : true,
							dataIndex : 'apply',
							renderer:renderTopic1
						}, {
							header : '描述',
							width : 100,
							sortable : true,
							dataIndex : 'Description'
						}],
				sm : sm,
			
				
				tbar : [{
							text : '添加',
							tooltip : '添加',
							iconCls : 'add',
							handler : function() {							
								SetAccessRules();
							}
						},'-',{
							text : '编辑',
							tooltip : '编辑',
							iconCls : 'modify',
							handler : function() {
								SetAccessRules();
							}
						}, '-', {
							text : '删除',
							tooltip : '删除',
							iconCls : 'delete',
							ref : '../removeBtn',
							disabled : true,
							handler : function() {
								var s = grid.getSelectionModel().getSelections();
								for (var i = 0; r = s[i]; i++) {
									store.remove(r);
								}
							}
						}, '-', {
							text : '查找',
							tooltip : '查找',
							iconCls : 'search',
							handler : function() {							
								WarnSearchWindows(SearchReturn);
							}
						}, '-', {
							text : '刷新',
							tooltip : '刷新',
							iconCls : 'refresh',
							handler : function() {							
								store.loadData(myData);
							}
						}, '-', {
							text : '导入',
							tooltip : '导入',
							iconCls : 'in',
							handler : function() {							
							}
						}, '-', {
							text : '导出',
							tooltip : '导出',
							iconCls : 'out',
							handler : function() {							
							}
						}],
				
				stripeRows : true,
				autoExpandColumn : 'id',
				stateful : true,
				stateId : 'accessrule111'
			});

	grid.getSelectionModel().on('selectionchange', function(sm) {
				grid.removeBtn.setDisabled(sm.getCount() < 1);
			});
			
		function renderTopic(value, p, record){
				
        return String.format("<a href='javascript:void(null)' onclick='javascript:SetAccessRules();'>{1}</a>",value,value);
    }
	function renderTopic1(value, p, record){
				if(value == '历史记录'){
					return String.format("{0}",value);
				}else{
					return String.format("<a href='javascript:void(null)' onclick='javascript:SetACLApply1();'>{0}</a>",value);
				}
    }	
	return grid;	
}
function SetAccessRules(){
	
	
	var states = [
		['0', '-- Any --'],
		['1', 'dmz'],
		['2', 'inside'],
		['3', 'mgmt'],
		['4', 'outside'],
		['5', 'partner-dmz']
		];
	var states1 = [
		['1', '上班时间'],
		['2', '下班时间'],
		['3', '周末时间'],
		['4', '周五上午']
		];
	var states2 = [
		['1', 'Defaule'],
		['2', 'Emergencies'],
		['3', 'Alerts'],
		['4', 'Critical'],
		['5', 'Error'],
		['6', 'Warnings'],
		['7', 'Notifications'],
		['8', 'Informational'],
		['9', 'Debugging']
		];
	
	var set_center = {
		xtype: 'fieldset',
		margins:'5 5 5 5',
		layout : 'form',
		region:'center',
		bodyStyle : 'padding:10px;',
		items: [
						{
								fieldLabel: 'Interface',
								xtype : 'combo',
								name : 'Interface',
								frame : true,
								id : 'Interface',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '0',
								editable : false,
								anchor: '100%'
						},{
		            xtype: 'radiogroup',
		            fieldLabel: 'Action',
		            columns: 3,
		            items: [
		                {boxLabel: 'Permit', name: 'cb-horiz-1', checked: true},
		                {boxLabel: 'Deny', name: 'cb-horiz-2'}
		            ]
		        },new Ext.form.CompositeField({ 
							    fieldLabel: 'Source', 
							    items: [ 
							    		
							        new Ext.form.TextField({ 
										    name: 'my_field',
										    value:'any',
										    flex: 1 
										  }),{ 
													xtype:"button", 
													text:"...", 
													handler:function() 
													{ 
													}
											}
							         
							    ] 
						}),new Ext.form.CompositeField({ 
							    fieldLabel: 'Destination', 
							    items: [ 
							    		
							        new Ext.form.TextField({ 
										    name: 'my_field',
										    value:'any', 
										    flex: 1 
										  }),{ 
													xtype:"button", 
													text:"...", 
													handler:function() 
													{ 
													}
											}
							         
							    ] 
						}),new Ext.form.CompositeField({ 
							    fieldLabel: 'Service', 
							    items: [ 
							    		
							        new Ext.form.TextField({ 
										    name: 'my_field',
										    value:'ip', 
										    flex: 1 
										  }),{ 
													xtype:"button", 
													text:"...", 
													handler:function() 
													{ 
													}
											}
							         
							    ] 
						}),{
								xtype : 'textarea',
								fieldLabel : 'Description',
								id : 'Description',
								name : 'Description',
								anchor : '100%'
						},{ 
								xtype: 'checkbox',
								hideLabel:true,
								boxLabel:'Enable Logging',
								name: 'Logging',
								id  : 'Logging'
						},{
								fieldLabel: 'Logging Level',
								xtype : 'combo',
								name : 'Level',
								frame : true,
								id : 'Level',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states2
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						},{
		            xtype:'fieldset',
		            checkboxToggle:true,
		            title: 'More Options',
		            id:'More',
		            autoHeight:true,
		            collapsed: false,
		            labelWidth: 120,   
								
		            items :[
		            					 { 
										            xtype: 'checkbox',
										            hideLabel:true,
										            boxLabel:'Enable Rule',
																name: 'Enable',
																id  : 'Enable'
										        },{
										            xtype: 'radiogroup',
										            fieldLabel: 'Traffic Direction',
										            columns: 3,
										            items: [
										                {boxLabel: 'In', name: 'cb-horiz-3', checked: true},
										                {boxLabel: 'Out', name: 'cb-horiz-4'}
										            ]
										        },new Ext.form.CompositeField({ 
															    fieldLabel: 'Source Service', 
															    items: [ 
															    		
															        new Ext.form.TextField({ 
																		    name: 'my_field',
																		    value:'', 
																		    flex: 1 
																		  }),{ 
																					xtype:"button", 
																					text:"...", 
																					handler:function() 
																					{ 
																					}
																			},{
																				xtype: 'label',
																				style:'padding-top: 4px; ', 
																				text:'(TCP or UDP service only)'
																			}
															         
															    ] 
														}),new Ext.form.CompositeField({ 
															    fieldLabel: 'Logging Interval', 
															    items: [ 
															    		
															        new Ext.form.TextField({ 
																		    name: 'my_field',
																		    value:'300', 
																		    flex: 1 
																		  }),{
																				xtype: 'label',
																				style:'padding-top: 4px; ', 
																				text:'seconds'
																			}
															         
															    ] 
														}),{
															fieldLabel: 'Time Range',
															xtype : 'combo',
															name : 'Time',
															frame : true,
															id : 'Time',
															store : new Ext.data.ArrayStore({
																	fields : ['abbr', 'state'],
																	data : states1
																}),
															valueField : 'abbr',
															displayField : 'state',
															typeAhead : true,
															mode : 'local',
															triggerAction : 'all',
															value : '1',
															editable : false,
															anchor: '100%'
													}
										 
		            ]


		        }
	
		]
	};

	var setWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 550,
				title : "Add Access Rule",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'add',
				items : [set_center],
				plain : true
				
			});
	setWindows.addButton({
				text : "确定",
				handler : function() {
					setWindows.close();
				}
			});
	setWindows.addButton({
				text : '取 消',
				handler : function() {
					setWindows.close();
				}
			});
	setWindows.show();
}